package com.prime.common;

/**
 * Created by cph on 17/11/23.
 */
public class MyException extends RuntimeException {

    private String message;

    public MyException(String message) {
        super();
        this.message = message;
    }

    public MyException(String message, Exception e) {
        super();
        String errorMsg = e.getMessage();
        if (null != errorMsg) {
            this.message = errorMsg;
        } else {
            this.message = message;
        }
    }

    @Override
    public String getMessage() {
        return message;
    }
}
